package cn.com.pc.content.controller;

import cn.com.pc.content.service.CensorPlatformService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

@Controller
@RequestMapping("/censor-platform")
public class CensorPlatformController {

    @Autowired
    private CensorPlatformService service;

    @RequestMapping("/callback")
    public ResponseEntity<?> callback(@RequestParam("url")String url, @RequestParam("status")int status, @RequestParam("version")long version, @RequestParam("updateAt")Date updateAt){
        int i = service.censorCallback(url, status, version, updateAt);
        return ResponseEntity.ok(i);
    }

}
